package org.xiaov.common.bean.rabbitmq;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xiaovcloud
 * @since 2021/11/11 11:10
 */
public class QueueChain {

	private final Map<String, QueueGroup> queueChain = new HashMap<String, QueueGroup>(16);

	private QueueGroup firstQueueName = null;

	public void addQueue(String queueName, QueueGroup nextQueue) {
		queueChain.put(queueName, nextQueue);
	}

	public QueueGroup getNextQueueName(String queueName) {
		return queueChain.get(queueName);
	}

	public void setFirstQueue(QueueGroup firstQueueName) {
		this.firstQueueName = firstQueueName;
	}

	public QueueGroup getFirstQueue() {
		return firstQueueName;
	}

	public int getQueueChainSize() {
		return queueChain.size();
	}

	public Map<String, QueueGroup> getQueueChain() {
		return queueChain;
	}
}
